<!-- 顶部导航 -->
<div class="main-container">
<div class="navbar nav-fixed-top main-nav" role="navigation">
  <div class="container">
    <div class="navbar-header">
      <!--<button></button>-->
      <a routerLink="posts" class="navbar-brand navbar-brand-my">Ng2 demo</a>
    </div>
    <div class="collapse navbar-collapse navbar-responsive-collapse" aria-expanded="false">
      <ul class="nav navbar-nav">
        <li class="dropdown" routerLinkActive="active">
          <a routerLink="posts" class=" navbar-brand-my">articles</a>
        </li>
        <li class="dropdown" >
          <a routerLink="echart" class=" navbar-brand-my">统计</a>
        </li>
      </ul>
      <ul class="nav navbar-nav navbar-right" *ngIf="!currentUser?.userName">
        <li routerLinkActive="active" [routerLinkActiveOptions]="{exact: true}">
          <a routerLink="login" class="navbar-brand-my">Login</a>
        </li>
        <li routerLinkActive="active">
          <a routerLink="register" class="navbar-brand-my">Register</a>
        </li>
      </ul>
      <ul class="nav navbar-nav navbar-right" *ngIf="currentUser?.userName">
        <li routerLinkActive="active" >
          <a routerLink="manage" class="navbar-brand-my">{{currentUser?.userName}}</a>
        </li>
        <li  >
          <a href="javascript:;" (click)="doLogout()"  class="navbar-brand-my">Logout</a>
        </li>
      </ul>
    </div>
  </div>
</div>
<!-- 主体内容区域 -->
<div class="container ">
  <router-outlet></router-outlet>
</div>
</div>

<!-- 底部区域 -->
<div class="footer bs-footer">
  <div class="container">
    <div class="row">
      <p>
        Powered by <a href="http://git.oschina.net/mumu-osc/NiceFish" target="_blank">NiceFish</a>
      </p>
    </div>
  </div>
</div>
